Skip to content

Update gcc from 5.5.0 to 7.3.0 #611

Merged
merged 4 commits into from
Feb 12, 2018
Merged

Conversation

donald
Copy link
Collaborator

@donald donald commented Feb 11, 2018

gcc 7.3 supports -mindirect-branch=thunk-extern which is used
(if available) by the kernel build to mitigate Spectre attacks
with a method called retpoline. If -mindirect-branch=thunk-extern
is not available, the kernel build will not (no longer) emit a
warning [1]. The insufficient protection will be visible on the
running system

root@dose:/sys# cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
Vulnerable: Minimal generic ASM retpoline

whereas when the kernel is compiled with gcc 7.3 (prun gcc-7.3.0-0 ./linux-4.14.18-207.bee) the output is:

root@dose:~# cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
Mitigation: Full generic retpoline
  1. Changes GCC 7: https://gcc.gnu.org/gcc-7/changes.html

  2. Changes GCC 6: https://gcc.gnu.org/gcc-6/changes.html

  3. Porting to GCC 7: https://gcc.gnu.org/gcc-7/porting_to.html

  4. Porting to GCC 6: https://gcc.gnu.org/gcc-6/porting_to.html

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-4.14.y&id=198660b7a5dd33b114001023d540c9072603e2a8

gcc 7.3 supports `-mindirect-branch=thunk-extern` which is used
(if available) by the kernel build to mitigate Spectre attacks
with a method called retpoline. If `-mindirect-branch=thunk-extern`
is not available, the kernel build will not (no longer) emit a
warning [1]. The insufficient protection will be visible on the
running system

    root@dose:/sys# cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
    Vulnerable: Minimal generic ASM retpoline

whereas when the kernel is compiled with gcc 7.3 (`prun gcc-7.3.0-0
./linux-4.14.18-207.bee`) the output is:

    root@dose:~# cat /sys/devices/system/cpu/vulnerabilities/spectre_v2
    Mitigation: Full generic retpoline

1.  Changes GCC 7: https://gcc.gnu.org/gcc-7/changes.html
2.  Changes GCC 6: https://gcc.gnu.org/gcc-6/changes.html

1.  Porting to GCC 7: https://gcc.gnu.org/gcc-7/porting_to.html
2.  Porting to GCC 6: https://gcc.gnu.org/gcc-6/porting_to.html

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-4.14.y&id=198660b7a5dd33b114001023d540c9072603e2a8
This is a template be0 file.
Installed shared libraries of gcc-5.5.0 which are not available in
gcc-7.3.0 and are required by other packages. Currently the only
library identified is `libgfortran.so.3`.

Created with

    cp scripts/TEMPLATE.be0 gcc_compat_5.5.0.be0

and the following changes:

    < # BEE_VERSION NAME-1.0-0
    ---
    > # BEE_VERSION gcc_compat_5.5.0-1.0-0
    12c12
    < SRCURL[0]="https://SERVER/PATH/NAME.${PKGVERSION}.tar.gz"
    ---
    > SRCURL=()
    64,67c64,69
    < #mee_install() {
    < #    bee_install
    < #}
    < ## by default this may be 'make install DESTDIR="${D}"'
    ---
    > mee_install() {
    >         cd ${D}
    >         tar xpf /src/mariux/beeroot/packages/gcc-5.5.0-1.x86_64.bee.tar.bz2 \
    > 		/usr/lib/libgfortran.so.3/ \
    > 		/usr/lib/libgfortran.so.3.0.0
    > }
@pmenzel pmenzel force-pushed the update-gcc-from-5.5.0-to-7.3.0 branch from 11a5187 to 0664223 Compare February 12, 2018 13:59
@pmenzel
Copy link
Collaborator

pmenzel commented Feb 12, 2018

Tested on keineahnung.

@pmenzel pmenzel merged commit 1d61e33 into master Feb 12, 2018
@donald donald deleted the update-gcc-from-5.5.0-to-7.3.0 branch February 14, 2018 15:04
thomas added a commit that referenced this pull request Jan 24, 2022
Installed shared libraries of gcc-7.5.0 which are not available in
gcc-10.3.0 and are required by other packages. The only library
needed is `libgfortran.so.4`.

This is a 'deep copy' from #611, 0664223, with numbers increased.
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants